﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Collections.Generic;

namespace HoaDon
{
	public partial class DSMon : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			DataTable dt = new DataTable();
			dt = SqlEXEC.GetData(Session["strConn"].ToString(), "SELECT * FROM vct81 WHERE FK_DatabaseID = '" + Session["FK_DatabaseID"].ToString() + "' AND Stt_rec = '" + Session["vHDA_Stt_Rec"].ToString() + "'");
			gdxdsmon.DataSource = dt;
			gdxdsmon.DataBind();
			decimal tien_hang = 0;
			for (int i = 0; i < dt.Rows.Count; i++)
				tien_hang = tien_hang + Convert.ToDecimal(dt.Rows[i]["Tien"]);
			tbTongTien.Text = tien_hang.ToString("#,#");
		}
	}
}
